package com.aloda.service;

import com.aloda.entity.AppBrowse;
import com.aloda.query.AppBrowsePageDTO;
import com.aloda.result.PageResult;
import com.aloda.vo.app.AppBrowseCountVO;
import com.aloda.vo.app.AppBrowseVO;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

public interface AppBrowseService extends IService<AppBrowse> {

    /**
     * 获取app浏览排行榜
     * @return
     */
    List<AppBrowseVO> getAppBrowseTop();

    /**
     * 增加app浏览量
     * @param id
     * @return
     */
    Boolean addAppBrowse(Long id);

    /**
     * 分页查询
     * @param appBrowsePageDTO
     * @return
     */
    PageResult<AppBrowseCountVO> pageQuery(AppBrowsePageDTO appBrowsePageDTO);

    /**
     * 获取今日所有应用浏览数据
     * @return
     */
    List<AppBrowseCountVO> getTodayHotApp();

    /**
     * 获取当前缓存中所有app浏览记录
     * @return
     */
    List<AppBrowse> getAllAppBrowse();

    /**
     * 删除指定id的应用今日浏览记录
     * @param id
     * @return
     */
    Boolean deleteAppBrowseById(Long id);

    /**
     * 导出应用浏览量表格信息
     * @param ids
     * @param response
     */
    void exportAppBrowseToExcel(List<Long> ids, HttpServletResponse response);
}
